package com.wzt.gift.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * @Author Zenith
 * @Date 2022/10/19 15:08
 * @Version 1.0
 */
@Configuration
@Data
@ConfigurationProperties(prefix = "oauth2.client")
public class OauthClientDetailsProperties {
    private OauthClientDetails admin;
    private OauthClientDetails portal;


    public OauthClientDetails getOauthClientDetails(Integer type) {
        return (type == 0) ? admin : portal;
    }
}
